﻿<html>
<head>
<title></title>
		<script charset="utf-8" src="./kindeditor/kindeditor-min.js"></script>
		<script charset="utf-8" src="./kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
		<script>
			var editor;
			var Atitle,Acontent;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : true,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});
				K('input[name=OK]').click(function(e) {
					Acontent=editor.html();alert(Acontent);
					Atitle=K("input[name=title1]").val();
						$.ajax({
						type:"POST",
						url:"crateHtml.php",
					data:'title='+Atitle+'&content='+Acontent,
						dataType:"text",
						success:function(data){
								alert(data);
						}
					});


					});
				
			});
		</script>
		<style type="text/css">
		form{
			margin: 40px 300px;

		}
		input{
			margin:  10px 70px;
		}
		#submit{
			float: right;
		}
		.autor{
			float: right;
		}
		</style>
</head>
<body>
<form>
	标题：
	<input type="text" name="title1" maxlength="120" id="blog-title-input" placeholder="请在这里输入标题" class="light_txt" style="color: rgb(0, 0, 0); font-size: 20px; font-family: 微软雅黑; font-weight: normal; background-color: transparent; ">
	<textarea name="content" style="width:700px;height:500px;visibility:hidden;"></textarea>

<div class="autor">
	发布者：
	<select>
	<option value="admin">admin</option>
	<option value="小小">小小</option>
	</select>
</div>

<input type="button" name="OK" value="发表" id="submit"/>
</form>
</body>
</html>